package com.web.dao.impl;
/*用户访问数据接口的实现类*/

import com.web.dao.UserDAO;
import com.web.entity.User;
import com.web.util.JDBCUtils;

import java.util.List;


public class UserDAOImpl implements UserDAO {
    @Override
    public User selectUserByUsername(String username) {
        List<User> users = JDBCUtils.query(User.class, "select*from t_user where username=?",username);
        if (users.size()>0){
            return users.get(0);
        }
        return null;
    }


}
